package ui.activity;

import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager.widget.ViewPager;

import android.app.AlertDialog;
import android.content.ContentResolver;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ListView;

import com.example.localvideo.R;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import adapter.PlayerListAdapter;
import adapter.VideoListAdapter;
import bean.VideoBean;
import ui.activity.BaseActivity;
import ui.fragment.BaseFragment;
import ui.fragment.VideoListFragment;
import ui.fragment.myDialog;
import utils.LogUtils;

public class MainActivity extends BaseActivity implements View.OnClickListener{
    private static final String TAG ="VideoListFragment";
    private ListView lv;



    private ViewPager vpPager;

    @Override
    public int getLayout() {
        return R.layout.activity_main;
    }

    @Override
    public void initView() {
        vpPager =(ViewPager) findViewById(R.id.vp);
    }

    @Override
    public void initData() {

    }

    @Override
    public void initListener() {
        List<BaseFragment> list = new ArrayList<>();
//       这里添加要显示的fragment
        list.add(new VideoListFragment());
        PlayerListAdapter playerListAdapter = new PlayerListAdapter(getSupportFragmentManager(),list);
        //设置适配器
        vpPager.setAdapter(playerListAdapter);
    }

    @Override
    public void onClick(View v) {

    }
}
